const random=(start:number,end:number)=>{
    const p=Math.random()
    return Math.floor(start*(1-p)+end*p)
}
async function main({ params }: Args): Promise<Output> {
    if(params.position==null){
        params.position=random(0,3)
    }
    if(params.shooting_hand==null){
        params.shooting_hand=random(0,2)
    }

    const style = params.style||'写实'
    const uniform_number = params.uniform_number||10
    const uniform_color = params.uniform_color||'红色'
    const position = params.position==0?'前锋':(params.position==1?'守门员':'后卫')
    const shooting_hand = params.shooting_hand==0?'左手':'右手'
    // 构建输出对象
    const ret = {
        style,
        uniform_number,
        uniform_color,
        position,
        shooting_hand
    };
    return ret;
}